﻿<phone:PhoneApplicationPage 
    xmlns:krempel="clr-namespace:Krempel.WP7.Core.Controls;assembly=Krempel.WP7.Core"  
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    x:Class="Krempel.WP7.TestApp.Examples.TurnstileExamplePage2"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:commands="clr-namespace:Krempel.WP7.TestApp.Commands"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    shell:SystemTray.IsVisible="True">

    <toolkit:TransitionService.NavigationInTransition>
        <toolkit:NavigationInTransition>
            <toolkit:NavigationInTransition.Backward>
                <krempel:ItemTurnstileTransition XMode="BackwardIn" YMode="BottomToTop" />
            </toolkit:NavigationInTransition.Backward>
            <toolkit:NavigationInTransition.Forward>
                <krempel:ItemTurnstileTransition XMode="ForwardIn" YMode="BottomToTop" />
            </toolkit:NavigationInTransition.Forward>
        </toolkit:NavigationInTransition>
    </toolkit:TransitionService.NavigationInTransition>
    <toolkit:TransitionService.NavigationOutTransition>
        <toolkit:NavigationOutTransition>
            <toolkit:NavigationOutTransition.Backward>
                <krempel:ItemTurnstileTransition XMode="BackwardOut" YMode="TopToBottom" />
            </toolkit:NavigationOutTransition.Backward>
            <toolkit:NavigationOutTransition.Forward>
                <krempel:ItemTurnstileTransition XMode="ForwardOut" YMode="TopToBottom" />
            </toolkit:NavigationOutTransition.Forward>
        </toolkit:NavigationOutTransition>
    </toolkit:TransitionService.NavigationOutTransition>

    <phone:PhoneApplicationPage.Resources>
        <commands:NavigationCommand x:Key="NavigationCommand" />
    </phone:PhoneApplicationPage.Resources>

    <Grid x:Name="LayoutRoot" Background="Transparent">
        <controls:Pivot Title="KREMPEL's WP7 SNIPPETS">
            <controls:PivotItem>
                <controls:PivotItem.Header>
                    <TextBlock krempel:ItemTurnstileTransition.ItemContinuumMode="ForwardInBackwardOut" Text="Bla bla bla" FontSize="{StaticResource PhoneFontSizeHuge}" />
                </controls:PivotItem.Header>
                <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
                    <toolkit:WrapPanel Name="ContentPanel">
                        <Button BorderThickness="0" krempel:ItemTurnstileTransition.IsTurnstileItem="True" Height="173" Width="346" Background="{StaticResource PhoneAccentBrush}" Click="Button_Click" />
                        <Button BorderThickness="0" krempel:ItemTurnstileTransition.IsTurnstileItem="True" Height="173" Width="173" Background="{StaticResource PhoneAccentBrush}" Click="Button_Click" />
                        <Button BorderThickness="0" krempel:ItemTurnstileTransition.IsTurnstileItem="True" Height="173" Width="173" Background="{StaticResource PhoneAccentBrush}" Click="Button_Click" />
                        <Button BorderThickness="0" krempel:ItemTurnstileTransition.IsTurnstileItem="True" Height="173" Width="346" Background="{StaticResource PhoneAccentBrush}" Click="Button_Click" />
                        <Button BorderThickness="0" krempel:ItemTurnstileTransition.IsTurnstileItem="True" Height="173" Width="173" Background="{StaticResource PhoneAccentBrush}" Click="Button_Click" />
                        <Button BorderThickness="0" krempel:ItemTurnstileTransition.IsTurnstileItem="True" Height="173" Width="173" Background="{StaticResource PhoneAccentBrush}" Click="Button_Click" />
                        <Button BorderThickness="0" krempel:ItemTurnstileTransition.IsTurnstileItem="True" Height="173" Width="346" Background="{StaticResource PhoneAccentBrush}" Click="Button_Click" />
                    </toolkit:WrapPanel>
                </ScrollViewer>
            </controls:PivotItem>
        </controls:Pivot>
    </Grid>

</phone:PhoneApplicationPage>